/* 电表管理页面样式 */
.ammeter-container {
    padding: 10px;
}

/* 搜索区域 */
.search-section {
    background: #fff;
    padding-top: 20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 2px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-form .form-group {
    flex: 1;
}

.search-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.search-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

/* 操作区域 */
.action-section {
    padding-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    padding: 8px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--secondary-color);
}

.action-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
}

.selection-info {
    color: #666;
}

/* 列表区域 */
.list-section {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: #666;
}

.data-table tr:hover {
    background: #fafafa;
}

/* 状态样式 */
.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.status-online {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-offline {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 操作按钮 */
.detail-btn {
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s;
}

.detail-btn:hover {
    color: var(--secondary-color);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: #fff;
    margin: 100px auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 4px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}
.modal-body{
    padding-bottom: 20px;
}
.close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.close:hover {
    color: #666;
}

/* 详情网格布局 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    white-space: nowrap;
    width: fit-content;
}

.detail-item label {
    color: #666;
    margin-right: 2px;
    min-width: 80px;
    text-align: right;
}

.detail-item span {
    flex: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 读数数据 */
.reading-data {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.reading-data h4 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.reading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.reading-item {
    display: flex;
    align-items: center;
    width: fit-content;
}

.reading-item label {
    color: #666;
    margin-right: 2px;
    min-width: 30px;
    text-align: right;
}

.reading-item span {
    flex: none;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content {
        margin: 50px 15px;
        width: auto;
    }
    
    .detail-grid,
    .reading-grid {
        grid-template-columns: 1fr;
    }
} 